/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package softm;
import java.io.FileInputStream;
import org.antlr.runtime.*;
import antlrpack.*;
import model.Location;
import model.UserData;
import org.hibernate.Session;
import org.hibernate.Transaction;
import hibernate.util.SessionFactoryUtil;

/**
 *
 * @author arpx
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws Exception {
        // TODO code application logic here

       /* Session session = SessionFactoryUtil.getSessionFactory().openSession();
        Transaction tx = session.beginTransaction();
        Location loc=new Location();
        loc.setCoordinates("12.03,13.04");
        loc.setPlace("tvm");
        session.save(loc);
        //UserData data=new UserData();

        tx.commit();
        session.close();*/

        ANTLRInputStream input = new ANTLRInputStream(new FileInputStream("//home//ashwin//source.txt"));
        // Create an ExprLexer that feeds from that stream
        ProcessLexer lexer = new ProcessLexer(input);
        // Create a stream of tokens fed by the lexer
        CommonTokenStream tokens = new CommonTokenStream(lexer);
        // Create a parser that feeds off the token stream
        ProcessParser parser = new ProcessParser(tokens,5);
        // Begin parsing at rule prog
        parser.prog();

    }

}
